form method = 'get'
  .panel.panel-default
    .panel-heading
      = link_to "新增" , new_maintain_style_path, class: "btn btn-primary btn-xs", :remote=>true

    .panel-body
		.table-responsive
	      table.table.table-bordered.table-hover
	        tr
	          th 编号
	          th 名称
	          th 操作
	          
	        -@maintain_styles.each do |m|
	          tr
	            td = m.code
	            td = m.name
	            td 
	                = link_to "修改", edit_maintain_style_path(:id => m.id), class: "btn btn-success btn-xs", style: "margin-right:10px;", :remote=>true
	                = link_to "删除" , maintain_style_path(:id => m.id), :method => "DELETE", data: {confirm: '一旦删除,将无法恢复,是否删除?'}, class: "btn btn-danger btn-xs", style: "margin-right:10px;"
	                = link_to "明细", maintain_style_path(:id => m.id), class: "btn btn-primary btn-xs"
	                span class="badge pull-right" #{m.maintain_items.size}
	              
